package com.sitecsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sitecsys.pojo.FTLUser;

import java.sql.Array;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

public interface FTLUserMapper extends BaseMapper<FTLUser> {

    FTLUser login(String phone, String password);

    FTLUser selectByPhone(String phone);

    Boolean updateAvatarByPhone(String phone, String avatar);

    FTLUser selectByPhoneAndName(String phone, String username);

    FTLUser selectByUsername(String username);

    Boolean updateUserById(Long id, String phone, String username, Integer status,String avatar, String ImageBase, String Q1, String Q2, String Q3, String A1, String A2, String A3, Timestamp updateTime);

    Boolean updateImageByPhone( String phone, String ImageBase, Timestamp updateTime);

    Integer CheckIsManager(String phone);

    Integer CheckStatusByPhone(String phone);

    List<FTLUser> getUsers(Integer page, Integer size);

    List<FTLUser> getUsersByIsManagerY(Integer page, Integer size);

    List<FTLUser> getUsersByIsManagerN(Integer page, Integer size);

    Integer getUsersCount(Integer ismanager);

    List<FTLUser>  getUsersByAdvSearch(String username, Integer auth, Integer status, Timestamp startTime, Timestamp endTime,  Integer page, Integer size);

    Boolean deleteByUserId(Integer userId);

    Boolean reSetPwdById(List<Long> ids, String password);

    Boolean batchDelById(List<Long> ids);

    Boolean batchResetStatus(Integer status, List<Integer> ids);

    List<FTLUser> getSuper();

    Integer getUsersCounts();

    List<FTLUser> getAllUser();

    void updateAuth(Long id, Integer auth);
}
